#include "stdafx.h"
#include "TestSemiSpheroid.h"
#include "UESemiSpheroid.h"
#include "UEEntityOperation.h"

CPPUNIT_TEST_SUITE_REGISTRATION( TestSemiSpheroid );


TestSemiSpheroid::TestSemiSpheroid()
{
}


TestSemiSpheroid::~TestSemiSpheroid()
{
}

void TestSemiSpheroid::testCreate()
{
	CUESemiSpheroid SemiSpheroid;
	AcGePoint3d BaseCenter;
	AcGeVector3d HeightDirction;
	double dHeight;
	double dRBottom;

	BaseCenter.set( 100, 100, 100 );
	HeightDirction.set( 1, 1, 0 );
	dHeight = 100;
	dRBottom = 200;

	SemiSpheroid.Set( BaseCenter, HeightDirction, dRBottom, dHeight );
	AcDb3dSolid* pSolid = SemiSpheroid.Create();

	Acad::ErrorStatus es = CUEEntityOperation::AddEntityToDwg( pSolid );

	if ( es != Acad::eOk )
	{
		delete pSolid;
	}

	pSolid->close();
}
